#include <bits/stdc++.h>
using namespace std;
int t[100005];
using LL = long long;
LL c[100005];
int n, m, k;
bool check(int x) {
  ;
  LL sum = 0;
  for (int i = 1; i <= n; i++) {

    sum += max(0, t[i] - x) * c[i];
    if (sum > m)
      return false;
  }
  return true;
}
int main() {
  cin >> n >> m >> k;
  int max_t = -1;
  for (int i = 1; i <= n; i++) {
    cin >> t[i] >> c[i];
    max_t = max(max_t, t[i]);
  }
  int l = k, r = max_t;
  int ans = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans;
  return 0;
}
